package network;

import gui.Forme;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Map;

public interface IReso extends Remote {

	public int requestJoinGroup() throws RemoteException;
	public void requestLeaveGroup(int id) throws RemoteException;
	
	public void registerProcessus(int id) throws RemoteException;
	public ArrayList<Integer> getListOfProcess() throws RemoteException;
	public void searchMaster(int idSource, int idDest) throws RemoteException;
	public void responseMasterReso(int idSource, int idDest) throws RemoteException;
	public void sendRequestListOfFormeReso(int idSource, int idDest) throws RemoteException;
	
	public void sendDrawingRequestReso(int idSource, int idDest) throws RemoteException;
	public void receiveDrawingResponseReso(int idDest, boolean scAvailable) throws RemoteException;
	public void sendFormeReso(int idSource, int idDest, int idForme, Forme forme) throws RemoteException;
	public void sendListOfFormeReso(int idSource, int idDest, Map<Integer, Forme> listOfForme) throws RemoteException;
	
	public void sendAckForme(int idSource, int idDest) throws RemoteException;
	public void sendEndSC(int idSource, int idDest) throws RemoteException;
	
	public void sendMsgElection(int idSource, int idDest) throws RemoteException;
	public void sendMsgAck(int idSource, int idDest) throws RemoteException;
	public void sendMsgMaster(int idSource, int idDest, int master) throws RemoteException;
	
	public void sendTok(int idSource, int idValMax, int idDest) throws RemoteException;
	public void sendLeader(int id, int voisin) throws RemoteException;
}
